/**
 * @Author:段永旭
 * @Date:20200519
 * @Describle:这是社区板块顶部栏的搜索与头像组件
 */

import React,{Component} from "react";
import "./nav.css"
import {Icon, NavBar} from "antd-mobile";
import Tabbar from "./nav_top";

class Nav extends React.Component
{
    constructor(props) {
        super(props);
        this.search = this.search.bind(this);
    }

    search(){
        //搜索页
    }

    render() {
        return (
            <div>
                <NavBar
                    mode="light"
                    icon={<img className="pic_r" src={require('./imgs/1.jpg') } alt="头像"/>}
                    onLeftClick={() => console.log('onLeftClick')}
                    rightContent={[
                        <Icon key="0" type="search" onClick={this.search} style={{ marginRight: '16px' }} />,
                        <Icon key="1" type="ellipsis" />,
                    ]}

                >社区</NavBar>
                <Tabbar/>
            </div>

        );
    }
}

export default Nav;